﻿<%@ WebHandler Language="C#" Class="insertSubCate" %>

using System;
using System.Web;

using AMCBO;
using AMCOBJ;

public class insertSubCate : IHttpHandler {

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        //context.Response.Write("Hello World");
        settings BOSettings = new settings();
        settingsObj ObjSettings = new settingsObj();
        int x = 0;
        if (!string.IsNullOrEmpty(context.Request.QueryString["cateid"]) && !string.IsNullOrEmpty(context.Request.QueryString["subcate"]))
        {
            ObjSettings.CateID = Convert.ToInt32(context.Request.QueryString["cateid"]);
            ObjSettings.SubCate = context.Request.QueryString["subcate"];

            x = BOSettings.addSubCate(ObjSettings);
            if (x == 0)
            {
                context.Response.Write("y");
            }
            else
            {
                context.Response.Write("n");
            }
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}